﻿@page
@using {{ ProjectInfo.FullName }}.Localization
@using Microsoft.AspNetCore.Mvc.Localization
@using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Modal;
@inject IHtmlLocalizer<{{ ProjectInfo.Name }}Resource> L
{{~ if Bag.PagesFolder; pagesNamespace = Bag.PagesFolder + "."; end ~}}
@model {{ ProjectInfo.FullName }}.Web.Pages.{{ pagesNamespace }}{{ EntityInfo.RelativeNamespace }}.{{ EntityInfo.Name }}.EditModalModel
@{
    Layout = null;
}
<abp-dynamic-form abp-model="ViewModel" data-ajaxForm="true" asp-page="EditModal">
    <abp-modal>
        <abp-modal-header title="@L["Edit{{ EntityInfo.Name }}"].Value"></abp-modal-header>
        <abp-modal-body>
        {{~ if EntityInfo.CompositeKeyName ~}}
            {{~ for prop in EntityInfo.CompositeKeys ~}}
            <abp-input type="hidden" asp-for="Id.{{ prop.Name }}" />
            {{~ end ~}}
        {{~ else ~}}
            <abp-input asp-for="Id" />
        {{~ end ~}}     
            <abp-form-content />
        </abp-modal-body>
        <abp-modal-footer buttons="@(AbpModalButtons.Cancel|AbpModalButtons.Save)"></abp-modal-footer>
    </abp-modal>
</abp-dynamic-form>
